converter
repeatedly accepts a tuple of input values and produces a tuple of output values. The converter may maintain internal dynamic state to deal with conversion of sequences of values (such as UTF-8's multi-byte encoding of code points). A final flush_ indicates that the converter will not receive any more data, and must now produce the final burst of output values.
A pair of converters can which have effectively inverse effects can together be considered a codec (enCOder/DECoder). Because of Avail's uniform treatment of primitive and non-primitive values, the same concept of converter can be usefully employed for both encoding and decoding.
Name | Type | Description | |
---|---|---|---|
Fields | |||
conversion type | ([⊥]→tuple)'s type | How to convert a bufferful of input, empty indicating a final flush. |